package com.woniu.customer.pojo;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import java.io.Serializable;
import lombok.Data;

/**
 * 
 * @TableName ecp_clients_orderBillings_unit
 */
@TableName(value ="ecp_clients_orderBillings_unit")
@Data
public class OrderbillingsUnit implements Serializable {
    /**
     * 开票/订货ID
     */
    @TableId(type = IdType.AUTO)
    private Long id;

    /**
     * 开户行ID
     */
    private Long bankId;

    /**
     * 客户ID
     */
    private Long customerId;

    /**
     * 开票单位
     */
    private String billingUnit;

    /**
     * 开户行名称
     */
    private String bankName;

    /**
     * 账号
     */
    private String account;

    /**
     * 开票手机号
     */
    private String phone;

    /**
     * 特殊开票要求
     */
    private String billingSpecial;

    /**
     * 联系地址
     */
    private String address;

    /**
     * 联系人
     */
    private String contactPerson;

    /**
     * 是否跨区
     */
    private Integer status;

    /**
     * 订货单位
     */
    private String orderingUnit;

    private String writterName;

    @TableField(exist = false)
    private static final long serialVersionUID = 1L;

    @Override
    public boolean equals(Object that) {
        if (this == that) {
            return true;
        }
        if (that == null) {
            return false;
        }
        if (getClass() != that.getClass()) {
            return false;
        }
        OrderbillingsUnit other = (OrderbillingsUnit) that;
        return (this.getId() == null ? other.getId() == null : this.getId().equals(other.getId()))
            && (this.getBankId() == null ? other.getBankId() == null : this.getBankId().equals(other.getBankId()))
            && (this.getCustomerId() == null ? other.getCustomerId() == null : this.getCustomerId().equals(other.getCustomerId()))
            && (this.getBillingUnit() == null ? other.getBillingUnit() == null : this.getBillingUnit().equals(other.getBillingUnit()))
            && (this.getBankName() == null ? other.getBankName() == null : this.getBankName().equals(other.getBankName()))
            && (this.getAccount() == null ? other.getAccount() == null : this.getAccount().equals(other.getAccount()))
            && (this.getPhone() == null ? other.getPhone() == null : this.getPhone().equals(other.getPhone()))
            && (this.getBillingSpecial() == null ? other.getBillingSpecial() == null : this.getBillingSpecial().equals(other.getBillingSpecial()))
            && (this.getAddress() == null ? other.getAddress() == null : this.getAddress().equals(other.getAddress()))
            && (this.getContactPerson() == null ? other.getContactPerson() == null : this.getContactPerson().equals(other.getContactPerson()))
            && (this.getStatus() == null ? other.getStatus() == null : this.getStatus().equals(other.getStatus()))
            && (this.getOrderingUnit() == null ? other.getOrderingUnit() == null : this.getOrderingUnit().equals(other.getOrderingUnit()));
    }

    @Override
    public int hashCode() {
        final int prime = 31;
        int result = 1;
        result = prime * result + ((getId() == null) ? 0 : getId().hashCode());
        result = prime * result + ((getBankId() == null) ? 0 : getBankId().hashCode());
        result = prime * result + ((getCustomerId() == null) ? 0 : getCustomerId().hashCode());
        result = prime * result + ((getBillingUnit() == null) ? 0 : getBillingUnit().hashCode());
        result = prime * result + ((getBankName() == null) ? 0 : getBankName().hashCode());
        result = prime * result + ((getAccount() == null) ? 0 : getAccount().hashCode());
        result = prime * result + ((getPhone() == null) ? 0 : getPhone().hashCode());
        result = prime * result + ((getBillingSpecial() == null) ? 0 : getBillingSpecial().hashCode());
        result = prime * result + ((getAddress() == null) ? 0 : getAddress().hashCode());
        result = prime * result + ((getContactPerson() == null) ? 0 : getContactPerson().hashCode());
        result = prime * result + ((getStatus() == null) ? 0 : getStatus().hashCode());
        result = prime * result + ((getOrderingUnit() == null) ? 0 : getOrderingUnit().hashCode());
        return result;
    }

    @Override
    public String toString() {
        StringBuilder sb = new StringBuilder();
        sb.append(getClass().getSimpleName());
        sb.append(" [");
        sb.append("Hash = ").append(hashCode());
        sb.append(", id=").append(id);
        sb.append(", bankId=").append(bankId);
        sb.append(", customerId=").append(customerId);
        sb.append(", billingUnit=").append(billingUnit);
        sb.append(", bankName=").append(bankName);
        sb.append(", account=").append(account);
        sb.append(", phone=").append(phone);
        sb.append(", billingSpecial=").append(billingSpecial);
        sb.append(", address=").append(address);
        sb.append(", contactPerson=").append(contactPerson);
        sb.append(", status=").append(status);
        sb.append(", orderingUnit=").append(orderingUnit);
        sb.append(", serialVersionUID=").append(serialVersionUID);
        sb.append("]");
        return sb.toString();
    }
}